﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace UbwApplication
{
    public partial class ucAnalogInput : UserControl
    {
        public ucAnalogInput()
        {
            InitializeComponent();

            progressBar1.Minimum = 0;       // typical min for an ADC
            progressBar1.Maximum = 1023;    // typical max for an ADC
            label1.Text = progressBar1.Value.ToString();
        }

        public int MaxValue
        {
            get
            {
                return progressBar1.Maximum;
            }
            set
            {
                progressBar1.Maximum = value;
            }
        }
        public int MinValue
        {
            get
            {
                return progressBar1.Minimum;
            }
            set
            {
                progressBar1.Minimum = value;
            }
        }
        public int Value
        {
            get
            {
                return progressBar1.Value;
            }
            set
            {
                progressBar1.Value = value;
                label1.Text = value.ToString();
            }
        }
    }
}
